﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI
{
    public partial class PassGet : Form
    {
        public event GUI.DriveInfoControl.MountWithPassEventHandler MountEvent;

        public PassGet()
        {
            InitializeComponent();
            passwordTBox.Focus();
        }

        private void pkBtn_Click(object sender, EventArgs e)
        {
            try
            {
                if (MountEvent != null)
                    MountEvent(passwordTBox.Text);
                passwordTBox.Clear();
                Close();
            }
            catch (Exception) { }
        }

        private void cancelBtn_Click(object sender, EventArgs e)
        {
            passwordTBox.Clear();
            Close();
        }
    }
}
